<script>    
    function loading(){
        document.getElementById('load').style.display = 'block';
    };     
</script>

<div id="load">
    <div id="load_img">  
        <img src="<?= base_url() . "style/loading4.gif"; ?>" alt="loading"/>
        &nbsp;&nbsp;Dáta sa nahrávajú, čakajte prosím.
    </div>
</div>

<div id="mess">
    <?php
    if (isset($mess))
        echo $mess;
     //if (isset($_POST['submit'])) $this->upload->display_errors('<p>', '</p>');
    ?></div>
<div id="form">
    <table>
        <?php
        $this->form_validation->set_error_delimiters('<span class="error">', '</span>');
        echo form_open_multipart(base_url() . 'admin/update');

        echo "<tr><td>" . form_label('Súbor:', 'file') . '</td><td><input type="file" name="userfile" id="file" size="64" /></td>
          <td><span class="error">';
        if (isset($up_error))
            echo $up_error;
        echo '</span></td></tr>';
        echo "<tr><td>" . form_submit('submit', 'Upload', 'class="submit_edit" onclick="loading();"') . "</td></tr>";
        echo form_close();
        ?> 
    </table> 
</div>